package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.RTbMerchantServiceTransactionRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbMerchantServiceTransactionRecordMapper;
import com.ruoyi.system.domain.TbMerchantServiceTransactionRecord;
import com.ruoyi.system.service.ITbMerchantServiceTransactionRecordService;

/**
 * 商家交易订单Service业务层处理
 * 
 * @author lzd
 * @date 2024-09-10
 */
@Service
public class TbMerchantServiceTransactionRecordServiceImpl implements ITbMerchantServiceTransactionRecordService 
{
    @Autowired
    private TbMerchantServiceTransactionRecordMapper tbMerchantServiceTransactionRecordMapper;

    /**
     * 商家交易订单、状态字典
     *
     * @param rTbMerchantServiceTransactionRecord 商家交易订单、状态字典
     * @return 商家交易订单集合
     */
    @Override
    public List<RTbMerchantServiceTransactionRecord> selectRTbMerchantServiceTransactionRecordList(RTbMerchantServiceTransactionRecord rTbMerchantServiceTransactionRecord) {
        return tbMerchantServiceTransactionRecordMapper.selectRTbMerchantServiceTransactionRecordList(rTbMerchantServiceTransactionRecord);
    }

    /**
     * 查询商家交易订单
     * 
     * @param transactionId 商家交易订单主键
     * @return 商家交易订单
     */
    @Override
    public TbMerchantServiceTransactionRecord selectTbMerchantServiceTransactionRecordByTransactionId(Long transactionId)
    {
        return tbMerchantServiceTransactionRecordMapper.selectTbMerchantServiceTransactionRecordByTransactionId(transactionId);
    }

    /**
     * 查询商家交易订单列表
     * 
     * @param tbMerchantServiceTransactionRecord 商家交易订单
     * @return 商家交易订单
     */
    @Override
    public List<TbMerchantServiceTransactionRecord> selectTbMerchantServiceTransactionRecordList(TbMerchantServiceTransactionRecord tbMerchantServiceTransactionRecord)
    {
        return tbMerchantServiceTransactionRecordMapper.selectTbMerchantServiceTransactionRecordList(tbMerchantServiceTransactionRecord);
    }

    /**
     * 新增商家交易订单
     * 
     * @param tbMerchantServiceTransactionRecord 商家交易订单
     * @return 结果
     */
    @Override
    public int insertTbMerchantServiceTransactionRecord(TbMerchantServiceTransactionRecord tbMerchantServiceTransactionRecord)
    {
        tbMerchantServiceTransactionRecord.setCreateTime(DateUtils.getNowDate());
        return tbMerchantServiceTransactionRecordMapper.insertTbMerchantServiceTransactionRecord(tbMerchantServiceTransactionRecord);
    }

    /**
     * 修改商家交易订单
     * 
     * @param tbMerchantServiceTransactionRecord 商家交易订单
     * @return 结果
     */
    @Override
    public int updateTbMerchantServiceTransactionRecord(TbMerchantServiceTransactionRecord tbMerchantServiceTransactionRecord)
    {
        tbMerchantServiceTransactionRecord.setUpdateTime(DateUtils.getNowDate());
        return tbMerchantServiceTransactionRecordMapper.updateTbMerchantServiceTransactionRecord(tbMerchantServiceTransactionRecord);
    }

    /**
     * 批量删除商家交易订单
     * 
     * @param transactionIds 需要删除的商家交易订单主键
     * @return 结果
     */
    @Override
    public int deleteTbMerchantServiceTransactionRecordByTransactionIds(Long[] transactionIds)
    {
        return tbMerchantServiceTransactionRecordMapper.deleteTbMerchantServiceTransactionRecordByTransactionIds(transactionIds);
    }

    /**
     * 删除商家交易订单信息
     * 
     * @param transactionId 商家交易订单主键
     * @return 结果
     */
    @Override
    public int deleteTbMerchantServiceTransactionRecordByTransactionId(Long transactionId)
    {
        return tbMerchantServiceTransactionRecordMapper.deleteTbMerchantServiceTransactionRecordByTransactionId(transactionId);
    }
}
